package mercede.allBean;

import mercede.allDTOs.ExcursionDTO;
import mercede.allDTOs.HotelDTO;
import mercede.allManagers.ExcursionMnager;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

@ManagedBean(name="excursionbean")
@javax.faces.bean.SessionScoped



public class excursionBean {
	
	@EJB
	ExcursionMnager excursionmgr;
	ExcursionDTO excursiondto;
	
	  
		private String city; 

	      
		   
	    public excursionBean() {
	    	excursiondto = new ExcursionDTO();
	    }
	    
	  

	    public String getCity() {  
	        return city;  
	    }  
	  
	    public void setCity(String city) {  
	        this.city = city;  
	    }  
	     

		  public ExcursionDTO getExcursiondto() {
		         return excursiondto;
		 }
			 
			 public void setExcursiondto(ExcursionDTO excursiondto)
			 {
				 this.excursiondto=excursiondto;
			 }
		 
		 
		 
		public List<ExcursionDTO> getListExcursionkDTO(){
		    return excursionmgr.getListExcursionDTO();
		}

		public List<?> getListgetExcursion() {
		    return  excursionmgr.getExcursion();
		}

		public List<ExcursionDTO> getListExcursionDTOByDest()
		{
			
			return excursionmgr.getListExcursionDTOByDest(city);
			}



		public void  remove(int ddd){
			
			excursionmgr.remove(ddd);
		}

		 

		 public String register() {
			 excursionmgr.save(excursiondto);
		         return "";
		 }
	 


}
